Fix app bundle crash, code signing, and add hide-from-dock toggle#3
Open
AsapShadzy wants to merge 1 commit intoHyperNoodlez:mainfrom
Open
Fix app bundle crash, code signing, and add hide-from-dock toggle#3AsapShadzy wants to merge 1 commit intoHyperNoodlez:mainfrom
AsapShadzy wants to merge 1 commit intoHyperNoodlez:mainfrom
Conversation
- Replace SwiftPM auto-generated resource_bundle_accessor with custom BundleAccessor.swift that looks in Contents/Resources/, fixing the crash when launching from a .app bundle (Bundle.module couldn't find PhemyNative_PhemyNative.bundle at the .app root) - Remove manual Dock tile icon override — let macOS handle icon natively via CFBundleIconFile for proper rounded-rectangle styling - Add "Hide from Dock on close" toggle in General > Startup settings - Reduce menu bar icon from 22pt to 18pt (standard macOS size) - Update Package.swift to exclude Resources from SwiftPM bundling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bundle.modulelooks for the resource bundle at the.approot, but macOS code signing doesn't allow files there ("unsealed contents"). Replaced with a customBundleAccessor.swiftthat looks inContents/Resources/, enabling proper code signing and the native macOS icon styling.NSApp.applicationIconImageandDockTileoverride bypassed macOS's native icon rendering (rounded rectangle). NowCFBundleIconFilehandles it natively.Changes
Package.swiftBundleAccessor.swift(new)Bundle.modulethat finds resources inContents/Resources/PhemyNativeApp.swiftGeneralSettingsView.swiftTest plan
./build-rust.sh && swift build -c releasescripts/create-dmg.sh— verify the .app bundle has resources inContents/Resources/and code signs cleanlyNote
create-dmg.shshould also be updated to place the resource bundle inContents/Resources/instead of the.approot, matching the newBundleAccessor.swiftlookup paths.